<template>
	<view>
		<view class="size-28 bold mt-30 ml-30">
			请输入您批改的分数
		</view>
		<view class="box">
			<view class="item">
				<input v-model="fs" type="number">
			</view>
		</view>
		<view class="btn" @click="score">
			确定
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				fs: ''
			};
		},
		onLoad(op) {
			this.id = op.id
		},
		methods: {
			score() {
				if (this.fs == '') {
					this.$utils.showToast('请输入分数')
				} else {
					this.$api.examScore({
						user_exam_id: this.id,
						score: this.fs
					}).then(res => {
						this.$utils.showToast(res.msg)

					})
				}
			},
		}
	}
</script>

<style lang="scss">
	input {
		width: 690rpx;
		height: 80rpx;
		background: #F8F8F8;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		opacity: 1;
		padding: 0 30rpx;
		box-sizing: border-box;
		margin: 20rpx 30rpx;
	}

	.btn {
		position: fixed;
		bottom: 160rpx;
		left: 50%;
		transform: translateX(-50%);
	}
</style>
